const {getMovieHttp} = require("../../module/http")
const {transfromStar} = require("../../utils/index")
Page({
  data:{
    movie:[]
  },
  onLoad:async function (){
    var res = await getMovieHttp();
    var movie = res.data.result;
    console.log(movie);
    
    movie.forEach(item=>{
      item["pf"] = transfromStar(item.raiting);
      item["rating"] = item.raiting
      // console.log(item.rating)
      this.setData({
        movie
      })
    })
  }
})